package com.muy.redis.view.window.redis.tree;

import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.project.Project;
import com.muy.redis.common.tree.MTTreeCell;
import com.muy.redis.common.tree.TreePanelMark;

import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;

/**
 * @Author jiyanghuang
 * @Date 2022/8/5 00:07
 */
public class MTTreeCellMrRedisRoot implements MTTreeCell {

    private Project project;

    public MTTreeCellMrRedisRoot(Project project) {
        this.project = project;
    }

    @Override
    public String cellShow() {
        return "MrRedisRoot";
    }

    @Override
    public Icon iconSelected() {
        return AllIcons.Hierarchy.Subtypes;
    }

    @Override
    public Icon iconUnselected() {
        return AllIcons.Hierarchy.Subtypes;
    }

    @Override
    public DefaultMutableTreeNode buildSubTreeNode(String jsonStr, TreePanelMark treePanelMark) {
        return null;
    }

    @Override
    public void treeSelectionListener(JTree tree, DefaultMutableTreeNode mutableTreeNode, TreePanelMark treePanelMark) {

    }

    @Override
    public ActionGroup rightClickActionGroup(JTree tree, DefaultMutableTreeNode mutableTreeNode, DefaultActionGroup defaultActionGroup, TreePanelMark treePanelMark) {
        return defaultActionGroup;
    }
}
